Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Device Communications Messages


GXCleanupStartSendPage

QuickDraw GX sends the GXCleanupStartSendPage message when an operation that has to be undone fails during the processing of a GXStartSendPage message. You need to override the GXCleanupStartSendPage message if you have overridden the GXStartSendPage message and your override contains code that can fail, such as a memory allocation or device initialization. Your override of the GXCleanupStartSendPage message must match the following formal declaration:

void MyCleanupStartSendPage (void);
DESCRIPTION
When an operation fails in your override of the GXStartSendPage message, you need to call the GXCleanupStartSendPage function.

When you call the GXCleanupStartSendPage function, QuickDraw GX sends the GXCleanupStartSendPage message to any message handlers that follow your printing extension or printer driver in the message chain. Each message handler is responsible for cleaning up any operations that it performed in its GXStartSendPage override. Usually this involves deallocating any storage that you allocated in your override of the GXStartSendPage message.

The GXCleanupStartSendPage message follows the same path through the message chain as did the original GXStartSendPage message, which allows the cleaning up to occur in the correct order.

The default implementation of the GXCleanupStartSendPage message disposes of memory allocated by the default implementation of the GXStartSendPage message.

SPECIAL CONSIDERATIONS
You never send the GXCleanupStartSendPage message yourself; however, you can call the GXCleanupStartSendPage function, which then sends this message.

You must forward the GXCleanupStartSendPage message to allow other message handlers to clean up any storage that they allocated in response to the GXStartSendPage message.

SEE ALSO
The GXCleanupStartSendPage function is described on page 5-37 in the chapter "Printing Functions for Message Overrides."

The GXStartSendPage message is described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help